var express = require('express');
var router = express.Router();
const mongodb= require('../components/mongodb');

/* GET users listing. */
router.get('/', function(req, res) {
	mongodb.find("case",{}).then(function(result){
		var delete_result;
		for(var i = 0;i < result.length;i++){
			//delete_result = await mongodb.deleteItems('case',{});
		}
		console.log("[Mongoose] Delete "+result.length+" items.");
		res.send(delete_result);
	})

});

module.exports = router;
